Different user, use different methods to make a list. Some uses doors bullets, some use tab with ascii bullets etc. |
Re: Detecting List
-Louie |
Re: Detecting List Would you be interested in having that RTF parser open source? Still looking for people who would be willing to commit to an open source DXL library. Sorry, that the library is not well commented, but I guess you will get the functionality pretty fast. You can use the nextToken() function in a loop to parse the RTF and then roam around in the tokens by using getToken(RTFParser, int) to look forward, backwards. The RTFParser also tracks the group name, which you can use to determine the location in the rtf, e.g. "rtf:fnttble:fnt" or something like this tells you, that you are in the font table of the rtf. I am not sure this will help, but I am pretty sure, for reliably detecting lists you will need to parse RTF. Additionally you probabably need to define the criteria that you would use for detecting lists, e.g. more than one space or a tab or a line indent followed by a bullet symbol or a number or and all of that at least twice? Regards, Mathias Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS Attachments attachment_14927969_RTFFunctions.dxl |
Re: Detecting List Mathias Mamsch - Fri Jan 11 05:59:55 EST 2013 Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS > I wrote an RTF parser once to handle a complex bullet point manipulation task. May be that the project http://nrtftree.sourceforge.net/ is a good template for this. Best regards Wolfgang |